package com.panomedic.gui;

import com.panomedic.core.Photos;
import java.awt.Dimension;
import javax.swing.JList;

/**
 *
 * @author Yare
 */
public class ThumbList extends JList {

    private final static int THUMB_W = 150;
    private final static int THUMB_H = 150;
    
    Photos photos = null;
    ThumbPanel cellRenderer = new ThumbPanel();
    
    public ThumbList(Photos photos, int width) {
        
        super(photos);
        this.photos = photos;
        
        setCellRenderer(cellRenderer);
        setFixedCellWidth(THUMB_W);                 //const
        setFixedCellHeight(THUMB_H);                //const
        setLayoutOrientation(JList.VERTICAL);
        setVisibleRowCount(20);
        
        
        
        // dim = new Dimension(width, THUMB_H * getModel().getSize());
        //setVisibileBounds(dim);
        setSelectedIndex(0);
        
        
    }

    
    
    
    
    
}
